package concurrency;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import net.mindview.util.CountingGenerator;
import net.mindview.util.MapData;

class ConcurrentHashMapTest extends MapTest {
    ConcurrentHashMapTest(int readers, int writers) {
        super("ConcurrentHashMap", readers, writers);
    }

    @Override
    Map<Integer, Integer> containerInitializer() {
        MapData<Integer, Integer> md = MapData.map(new CountingGenerator.Integer(), new CountingGenerator.Integer(), sContainerSize);
        Map<Integer,Integer> map = new ConcurrentHashMap<Integer,Integer>(md);
        return map;
    }
}
